package com.ourhealth.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ourhealth.entity.Result;
import com.ourhealth.pojo.Menu;
import com.ourhealth.service.MenuService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ych
 * @version v1.0
 * @date 2019/12/3 16:07
 * @description
 **/
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Reference
    MenuService menuService;

    @RequestMapping("/findMenus")
    public Result findMenus(String username){
        List<Menu> menus = menuService.findMenus(username);
        return new Result(true,"",menus);
    }

}